<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


Route::get('/', function () {
    return view('welcome');
});
// 404页面
Route::get('/404', function(){
    abort(404);
});
//后台控制器
Route::Controller('/admin/','AdminController');
 //后台商品分类
Route::Controller('/admin/sort','SortController');
//后台订单管理
Route::Controller('/admin/orders','OrdersController');


//前台首页
Route::get('/','IndexController@index');
//头部搜索
Route::match(['get','post'],'/search','IndexController@search');
//商品列表页
Route::Controller('/goods','GoodsController');
// Route::get('/goods/list','GoodsController@index');


// 隐式路由器 后台登录
Route::Controller('/admin/log','LoginController');
// 隐式路由器 前台登录
Route::Controller('/log/log','LoginController');
//前台用户退出
Route::get('/logout','LoginController@logout');

// 隐式路由器 详情页面
Route::Controller('/xiangqing/xiangqing','XqController');

// 加入购物车
Route::post('/cart/insert','CartController@insert');
// 查看购物车
Route::get('/cart/index','CartController@index');

// 清空购物车
Route::get('/cart/clear','CartController@clear');


// 注册
Route::get('register','LoginController@register');
Route::post('register','LoginController@doregister');

//邮件注册
Route::get('mail','LoginController@sendMail'); 


// 激活
Route::get('jihuo','LoginController@jihuo');


//忘记密码
Route::get('forget','LoginsController@getForget');
Route::post('forget','LoginsController@doforget');


//重置密码
Route::get('reset','LoginsController@reset');
Route::post('reset','LoginsController@doReset');
